const { Pool, Client } = require('pg')
const pool = new Pool({
    connectionString:'postgresql://postgres:postgres@localhost:5432/xxx'
    /*
  user: 'dbuser',
  host: 'database.server.com',
  database: 'mydb',
  password: 'secretpassword',
  port: 5432,
  */
})
/*
const res = await pool.query('SELECT NOW()')
console.log(res)
await pool.end()
*/
pool.query('SELECT NOW()', (err, res) => {
  console.log(err, res)
  pool.end()
})
